package com.jic.point.mapper;

import com.jic.point.model.entity.ConfActivityRuleApply;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public interface ConfActivityRuleApplyMapper {
	/**
	 * CONF_ACTIVITY_RULE插入数据
	 * @param confActivityRule 入参实体类
	 */
	int insert(ConfActivityRuleApply confActivityRule);

	/**
	 * CONF_ACTIVITY_RULE插入数据
	 * @param confActivityRule 入参实体类
	 */
	int insertSelective(ConfActivityRuleApply confActivityRule);

	/**
	 * CONF_ACTIVITY_RULE根据表对象数据修改数据
	 * @param confActivityRule 入参实体类
	 */
	int updateByPrimaryKey(ConfActivityRuleApply confActivityRule);

	/**
	 * 根据code逻辑删除
	 * @param confActivityRule
	 * @return
	 */
	int updateByCode(ConfActivityRuleApply confActivityRule);


	/**
	 * CONF_ACTIVITY_RULE根据表对象数据修改数据
	 * @param confActivityRule 入参实体类
	 */
	int updateByPrimaryKeySelective(ConfActivityRuleApply confActivityRule);


	/**
	 * CONF_ACTIVITY_RULE根据id删除数据
	 * @param confActivityRule 入参实体类
	 */
	int deleteByPrimaryKey(ConfActivityRuleApply confActivityRule);

	/**
	 * CONF_ACTIVITY_RULE根据主键查询数据
	 * @param confActivityRule 入参实体类
	 */
	ConfActivityRuleApply selectByPrimaryKey(ConfActivityRuleApply confActivityRule);
	ConfActivityRuleApply selectByCode(ConfActivityRuleApply confActivityRule);

	/**
	 * CONF_ACTIVITY_RULE根据主键查询数据
	 * @param confActivityRule 入参实体类
	 */
	List<ConfActivityRuleApply> listPageBySelective(ConfActivityRuleApply confActivityRule);

	/**
	 * CONF_ACTIVITY_RULE查询数据
	 * @param confActivityRule 入参实体类
	 */
	List<ConfActivityRuleApply>  selectBySelective(ConfActivityRuleApply confActivityRule);

    BigDecimal queryAvailablePoint(String busiCode);

    /**
     *
     *
     * @description: 以时间来查询申请的活动规则
     * @return:
     * @author: fengrui
     * @time: 2020/12/03 13:49
     */
    List<ConfActivityRuleApply> selectavApply(@Param("date") Date time);

    /**
     *
     *
     * @description： 以时间来查询删除的活动规则
     * @return:
     * @author: fengrui
     * @time: 2020/12/03 13:49
     */
	List<ConfActivityRuleApply> selectDelete(Date time);
	
	/**
	 *
	 *
	 * @description: 以时间来查询修改的活动规则
	 * @return: 
	 * @author: fengrui
	 * @time: 2020/12/03 13:50
	 */  
	List<ConfActivityRuleApply> selectUpdate(Date time);
}
